-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update: hr within select element #504
Conversation
closes #480 Outside of browsers / AT significantly changing how people interact with the UA-provided listboxs, I don't see how the use of hr can be more than declarative decoration, since the element will not be directly accessible to anyone using AT. If anyone thinks otherwise, and browsers/AT are willing to make changes to how this component has been behaving/exposed, we can discuss and change the PR.
@@ -2792,6 +2792,7 @@ <h4 id=el-hr>`hr`</h4> | |||
<tr> | |||
<th>Comments</th> | |||
<td> | |||
<p>If an `hr` element is a descendant of a `select` element, user agents MAY expose the element with a role of `none`.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matches the standard list separator behavior in Mac, and it's also a MAY, so probably okay to approve without requiring input from Chrome, Edge, and Gecko, but as a courtesy, we should request input from @aleventhal @benbeaudry and @jcsteh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarity, my @ mention above counts as that courtesy request. @scottaohara if you don't hear back in a week and have a second approval, please merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me. +1
Looks like this is shipping in chrome 119 - https://bugs.chromium.org/p/chromium/issues/detail?id=1441883. Nothing special going on with that implementation for the hr elements. they're just rendering some visual separators with no exposure to the a11y tree, from what I can tell (which is good, imo). Firefox bug as well: https://bugzilla.mozilla.org/show_bug.cgi?id=1830909 going to merge this per the webkit/upcoming chrome implementations |
Wouldn't it make more sense to continue map it to separator and then let the decision of what to do with separator remain there? At least for Apple platforms we wouldn't have specific code for |
As I see it, there are 3 options:
So I would still prefer to let the spec text remain as above... It's a MAY after all, but an educated MAY... Effectively ~"Implementors, if you need to change something, change it here, not there. Don't toss it over the fence and make the AT do all the work." |
I fail to see why this is a thing at all; what's the use case/justification for this What is a separator if not a grouping element. By separating things you are grouping them; it's one and the same thing. All I see happening here is that a generation of people already not aware of the <select>
<option disabled>Section 1</option>
<option value=1>One</option>
<option value=2>Two</option>
<hr>
<option disabled>Section 2</option>
<option value=2-1>One</option>
<option value=2-2>Two</option>
</select> This seems like a solution to a styling problem that isn't actually a problem, and is going to make more problems for more people, IMO. |
hi @MattWilcox, might i suggest you post your comment over in the HTML issue/PR that added this allowance? For instance, whatwg/html#9124 |
It's an unnamed |
This is not necessarily true:
IMO, it's not great that we're effectively saying that we "might not" make the existence of separators perceivable to some users. If they're present visually, that suggests there is a good reason for that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jcsteh wrote:
IMO, it's not great that we're effectively saying that we "might not" make the existence of separators perceivable to some users.
I assume you'd prefer this is exposed in some predictable way (role=separator) that the AT can choose to ignore or present. Is that your intention? If so, the only resolution you'd be happy with is rejecting this PR in its entirety, correct?
I'm mindful that this is not a straightforward situation. While not ideal IMO, if MacOS has not exposed separators in native lists forever and doing so will break things horrendously, then obviously this is going to be a big lift to fix. All of us have to pick the battles on which we are willing to expend the most energy. Given that we almost certainly have bigger fish to fry across the board, I don't think this is one of those cases for me. That said, I thought it was important to point out that hr can absolutely be (and possibly should be) more than declarative decoration on some platforms. This PR doesn't preclude that, though. |
closes #480
Outside of browsers / AT significantly changing how people interact with the UA-provided listboxs, I don't see how the use of hr can be more than declarative decoration, since the element will not be directly accessible to anyone using AT.
If anyone thinks otherwise, and browsers/AT are willing to make changes to how this component has been behaving/exposed, we can discuss and change the PR.
Preview | Diff